CREATE TABLE [dbo].[TCMOVI_BACO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_CONC] [dbo].[TD_VC_004] NOT NULL,
[MM_CONC] [dbo].[TD_VC_002] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TCMOVI_BA__NU_SE__7B264821] DEFAULT ((0)),
[AA_BNCO] [dbo].[TD_VC_004] NULL,
[MM_BNCO] [dbo].[TD_VC_002] NULL,
[FE_OPER] [dbo].[TD_DT_001] NOT NULL,
[FE_CHEQ] [dbo].[TD_DT_001] NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_BANC] [dbo].[TD_VC_020] NOT NULL,
[DE_NOMB_ORDE] [dbo].[TD_VC_100] NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[IM_MOVI] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TCMOVI_BA__IM_MO__7C1A6C5A] DEFAULT ((0)),
[ST_FLAG] [dbo].[TD_VC_001] NULL,
[ST_CONC] [dbo].[TD_VC_001] NULL,
[CO_GRUP_CONC] [dbo].[TD_VC_020] NULL,
[ST_ORIG] [dbo].[TD_VC_001] NULL,
[NU_CORR_CONC] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCMOVI_BA__CO_US__7D0E9093] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCMOVI_BA__FE_US__7E02B4CC] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCMOVI_BA__CO_US__7EF6D905] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCMOVI_BA__FE_US__7FEAFD3E] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCMOVI_BACO] ADD CONSTRAINT [PK__TCMOVI_B__C00AE7C5206DA6C0] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC], [AA_CONC], [MM_CONC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCMOVI_BACO] ADD CONSTRAINT [FK__TCMOVI_BACO__0B287117] FOREIGN KEY ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC]) REFERENCES [dbo].[TMCNTA_BANC] ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC])
GO
